# Maintainer: Build Robot <buildrobot@pay.pizza>
pkgname=grpc-health-check
pkgver=0.1.1
pkgrel=3
arch="all !s390x !ppc64le !armhf !armv7 !riscv64"
pkgdesc="gRPC health checking protocol"
url="https://github.com/paypizza/grpc-health-check"
license="Apache-2.0"
makedepends="cargo protoc rustfmt cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/paypizza/grpc-health-check/archive/$pkgver.tar.gz"


prepare() {
	default_prepare
	cargo fetch --target="$CTARGET"
}

build() {
	export PROTOC=/usr/bin/protoc
	cargo auditable build --release --frozen
}

check() {
	export PROTOC=/usr/bin/protoc
	cargo test --frozen
}

package() {
	install -Dm755 target/release/grpc-health-check -t "$pkgdir"/usr/bin/
}

sha512sums="
4f97a0c7399643843f2599799a1b255c7b712c17d115fc7933c042281611250b69bfcd3c0d4c515fcb413eb22ccd6e1644733a6f671c2ad7be8def4e1f695d5b  grpc-health-check-0.1.1.tar.gz
"
